# hashlib 加密算法 md5 sha1 sha256 单向
# base64可逆

import hashlib

msg = '中午一起吃饭'
md5 = hashlib.md5(msg.encode('utf-8'))

print(md5.hexdigest())  # 201a0589ccabcdc8e6f4658eb850a71c

s1 = hashlib.sha1(msg.encode('utf-8'))
print(s1.hexdigest())

s256 = hashlib.sha256(msg.encode('utf-8'))
print(s256.hexdigest())
